﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DBSchemaViewer.BackEnd.Entities;


namespace DBSchemaViewer.BackEnd.ModelXML.Helpers
{
    public static class CollectionHelper
    {
        /// <summary>
        /// TODO: Make it generic to any type !!!
        /// </summary>
        /// <param name="listToConvert"></param>
        /// <returns></returns>
        public static ObservableCollection<EntityTableFieldEntry> ConvertFromListToObservableCollection(List<EntityTableFieldEntry> listToConvert)
        {
            ObservableCollection<EntityTableFieldEntry> convertedList = new ObservableCollection<EntityTableFieldEntry>();

            foreach (EntityTableFieldEntry currItem in listToConvert)
            {
                convertedList.Add(currItem);
            }

            return convertedList;
        }
    }
}
